Skip to content

Conversation

@lntue
Copy link
Contributor

@lntue lntue commented Oct 14, 2024

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Oct 14, 2024

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/112286.diff

1 Files Affected:

  • (modified) libc/cmake/modules/LLVMLibCCompileOptionRules.cmake (+2-2)
diff --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 3846c597e6894f..737ac87f4c7a21 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -155,11 +155,11 @@ function(_get_common_compile_options output_var flags)
     # Silence this warning because _Complex is a part of C99.
     if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
       list(APPEND compile_options "-fext-numeric-literals")
-      list(APPEND compile_options "-Wno-pedantic")
     else()
       list(APPEND compile_options "-Wno-c99-extensions")
       list(APPEND compile_options "-Wno-gnu-imaginary-constant")
     endif()
+    list(APPEND compile_options "-Wno-pedantic")
     list(APPEND compile_options "-Wimplicit-fallthrough")
     list(APPEND compile_options "-Wwrite-strings")
     list(APPEND compile_options "-Wextra-semi")
@@ -239,12 +239,12 @@ function(_get_common_test_compile_options output_var c_test flags)
     if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
       if(NOT c_test)
         list(APPEND compile_options "-fext-numeric-literals")
-        list(APPEND compile_options "-Wno-pedantic")
       endif()
     else()
       list(APPEND compile_options "-Wno-c99-extensions")
       list(APPEND compile_options "-Wno-gnu-imaginary-constant")
     endif()
+    list(APPEND compile_options "-Wno-pedantic")
     # if(NOT CMAKE_COMPILER_IS_GNUCXX)
     #   list(APPEND compile_options "-Wnewline-eof")
     #   list(APPEND compile_options "-Wnonportable-system-include-path")

@lntue lntue merged commit cadfd0b into llvm:main Oct 14, 2024
6 of 8 checks passed
@lntue lntue deleted the complex branch October 14, 2024 23:55
DanielCChen pushed a commit to DanielCChen/llvm-project that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants